package com.caption.api.client.impl;

import com.caption.api.client.IDCardAuthClient;
import com.caption.api.client.base.BaseApiClient;
import com.caption.api.entity.IDCarAuthCondition;
import com.caption.api.entity.IDCarAuthResultDTO;
import com.caption.api.entity.base.ApiResponse;
import org.springframework.stereotype.Service;

@Service
public class IDCardAuthClientImpl extends BaseApiClient<ApiResponse<IDCarAuthResultDTO>, IDCarAuthCondition> implements IDCardAuthClient {
    /**
     * 调用父类抽象方法
     * @param condition
     * @return
     */
    @Override
    public ApiResponse<IDCarAuthResultDTO> call(IDCarAuthCondition condition) {
        ApiResponse<IDCarAuthResultDTO>  response = super.invoke(condition);
        return response;
    }

    /**
     * 实现调用逻辑
     * @param interfacesId
     * @param condition
     * @return
     */
    public ApiResponse<IDCarAuthResultDTO> execute(String interfacesId,IDCarAuthCondition condition){
        System.out.println("执行人像认证");
        IDCarAuthResultDTO resultDTO = new IDCarAuthResultDTO(0);
        ApiResponse  apiResponse = new ApiResponse(resultDTO);
        return apiResponse;
    }

    @Override
    public String getInterfaces(){
        return "A0001";
    }

}
